import request from '@/utils/request'
// 礼品跨平台调拨，获取门店礼品列表
// first_type:
// second_type:
// type:        三级类别
// store_id:2
// name:
// gift_id:
// no_obsolete:
// gb_code:
// label_id:    标签
export function getGiftList(data, page) {
    return request({
        url: '/Stock_platform_transfers/gift_list_new/'+ (page ? page : 1),
        method: 'post',
        data: data
    })
}
// 礼品跨平台调拨下单，添加购物车
// gift_id:1
// num:1
// store_id:2
export function addToCart(data) {
  return request({
      url: "/Stock_platform_transfers/platform_add_gift_to_cart",
      method: 'post',
      data: data
  })
}
// 礼品跨平台调拨，获取购物车中礼品种类数
// store_id: 1
export function cartSize(data) {
  return request({
      url: "/Stock_platform_transfers/get_gift_cart_size",
      method: 'post',
      data: data
  })
}
// 礼品跨平台调拨，获取购物车列表
// store_id: 1, 
export function getCartList(data) {
  return request({
      url: '/Stock_platform_transfers/platform_transfers_cart',
      method: 'post',
      data: data
  })
}
// 礼品跨平台调拨，删除购物车礼品
// gift_id: 58024
// store_id: 142
export function deleteCart(data) {
  return request({
      url: '/Stock_platform_transfers/platform_del_gift_from_cart',
      method: 'post',
      data: data
  })
}
// 礼品跨平台调拨，修改购物车礼品
// gift_id: 78657
// num: 修改后数量
// store_id: 111
// id: 1，购物车id
export function editCart(data) {
  return request({
      url: '/Stock_platform_transfers/edit_gift_to_cart',
      method: 'post',
      data: data
  })
}
// 礼品跨平台调拨，清空购物车
// store_id: 111
export function clearCart(data) {
  return request({
      url: '/Stock_platform_transfers/platform_clean_cart_gift',
      method: 'post',
      data: data
  })
}
// 礼品跨平台调拨，提交订单
// store_id_in:3    调入门店（共享）
// store_id_out:2   调出门店（scfy）
// order:[{"gift_id":"2","order_num":"1","look_money":15840000,"money_cost":15840000}]
// prov:12
// city:208
// dist:1318
// prov_name:浙江
// city_name:杭州
// dist_name:下城
// name:张三
// phone:18945687485
// address:收货地址
export function submitOrder(data) {
  return request({
      url: '/Stock_platform_transfers/platform_create_transfer_order',
      method: 'post',
      data: data
  })
}


